

<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
    <style>
    /* base */
    html,
    body,
    .container {
      width: 100%;
      height: 100%;
    }

    a,
    a:link,
    a:visited {
      text-decoration: none;
      color: inherit;
    }

    ul {
      list-style: none;
    }

    *,
    ::before,
    ::after {
      box-sizing: border-box;
      margin: 0;
      padding: 0;
    }

    *:focus {
      outline: 0;
    }

    .container {
      display: flex;
      padding-top: 20px;
    }

    /* Nav */
    .container .doc-nav {
      position: fixed;
      height: 100%;
      margin: 0 30px 0 40px;
      width: 280px;
    }

    .doc-nav .nav-header {
      display: flex;
      align-items: center;
      box-sizing: border-box;
      background-color: rgb(240, 241, 242);
      height: 40px;
      padding: 16px;
      font-size: 18px;
      font-weight: 500;
      color: rgb(62, 64, 66);
      cursor: pointer;
    }

    .doc-nav .nav-content {
      height: calc(100% - 40px);
      overflow-y: auto;
      color: rgb(32, 34, 36);
    }

    .doc-nav .nav-content .nav-list,
    .doc-nav .nav-content .nav-sub-list {
      line-height: 1.5rem;
    }

    .doc-nav .nav-content .nav-label {
      display: inline-block;
      position: relative;
      padding: 2px 0 2px 20px;
      margin-bottom: 4px;
    }

    .doc-nav .nav-content .nav-sub-label {
      position: relative;
      padding: 2px 0 2px 40px;
      font-size: 14px;
    }

    .doc-nav .nav-content .nav-sub-label:hover {
      text-decoration: underline;
    }

    .doc-nav .nav-content .nav-list .nav-label.group::before {
      border-bottom: 0.25rem solid transparent;
      border-left: 0.25rem solid #6e7072;
      border-right: 0;
      border-top: 0.25rem solid transparent;
      content: '';
      display: block;
      height: 0;
      left: 0.5rem;
      position: absolute;
      top: 0.625rem;
      transition: transform 0.1s linear;
      width: 0;
    }

    .doc-nav .nav-content .nav-list .nav-label.group.active::before {
      transform: rotate(90deg);
    }

    /* doc content */
    .container .doc-content {
      position: fixed;
      height: 100%;
      width: calc(100% - 80px - 40px - 30px - 240px);
      right: 0%;
      overflow-y: auto;
    }

    .doc-title {
      border-bottom: 1px solid #dcdee0;
      font-size: 22px;
      margin: 8px 0 0;
      padding-bottom: 16px;
    }

    .doc-content h3 {
      font-size: 24px;
      font-weight: 600;
      margin: 24px 0;
    }

    .doc-content h4 {
      font-size: 22px;
      font-weight: 500;
      margin: 30px 0 8px;
    }

    .doc-content h4 span {
      color: #007d9c;
    }

    .doc-content .doc-declare {
      background-color: #fafafa;
      border-radius: 5px;
      border: 1px solid #ccc;
      font-size: 14px;
      overflow-x: auto;
      padding: 10px;
      tab-size: 4;
      line-height: 20px;
    }

    .doc-content .doc-comment {
      font-size: 16px;
      margin: 16px 0;
      line-height: 24px;
      word-break: break-word;
    }
  </style>

</head>
<body>
  <div class="container">
    <div class="doc-nav">
      <a href="#Documentation" class="nav-header">Documentation</a>
      <nav class="nav-content">
        <ul class="nav-list">
          <li>
            <a href="#includes" class="nav-label">Includes</a>
             
            <ul class="nav-sub-list">

              <li>
                <a href="#config.h" class="nav-sub-label">config.h</a>
              </li>
      

              <li>
                <a href="#MBEDTLS_CONFIG_FILE" class="nav-sub-label">MBEDTLS_CONFIG_FILE</a>
              </li>
      

              <li>
                <a href="#ssl.h" class="nav-sub-label">ssl.h</a>
              </li>
      

              <li>
                <a href="#cipher.h" class="nav-sub-label">cipher.h</a>
              </li>
      

              <li>
                <a href="#threading.h" class="nav-sub-label">threading.h</a>
              </li>
      
            </ul>
            
          </li>
          <li>
            <a href="#macros" class="nav-label">Macros</a>
             
            <ul class="nav-sub-list">

              <li>
                <a href="#MBEDTLS_SSL_TICKET_H" class="nav-sub-label">MBEDTLS_SSL_TICKET_H</a>
              </li>
      
            </ul>
            
          </li>
          <li>
            <a href="#functions" class="nav-label">Functions</a>
             
            <ul class="nav-sub-list">

              <li>
                <a href="#mbedtls_ssl_ticket_init" class="nav-sub-label">mbedtls_ssl_ticket_init</a>
              </li>
      

              <li>
                <a href="#mbedtls_ssl_ticket_setup" class="nav-sub-label">mbedtls_ssl_ticket_setup</a>
              </li>
      

              <li>
                <a href="#mbedtls_ssl_ticket_free" class="nav-sub-label">mbedtls_ssl_ticket_free</a>
              </li>
      
            </ul>
            
          </li>
          <li>
            <a href="#vars" class="nav-label">Vars</a>
             
            <ul class="nav-sub-list">

              <li>
                <a href="#mbedtls_ssl_ticket_write" class="nav-sub-label">mbedtls_ssl_ticket_write</a>
              </li>
      

              <li>
                <a href="#mbedtls_ssl_ticket_parse" class="nav-sub-label">mbedtls_ssl_ticket_parse</a>
              </li>
      
            </ul>
            
          </li>
          <li>
            <a href="#consts" class="nav-label">Consts</a>
            
            <ul class="nav-sub-list">
            
            </ul>
            
          </li>
          <li>
            <a href="#types" class="nav-label">Types</a>
            
            <ul class="nav-sub-list">
            
            </ul>
            
          </li>
          <li>
            <a href="#typedefs" class="nav-label">Typedefs</a>
             
            <ul class="nav-sub-list">

              <li>
                <a href="#
mbedtls_ssl_ticket_key;
" class="nav-sub-label">
mbedtls_ssl_ticket_key;
</a>
              </li>
      

              <li>
                <a href="#
mbedtls_ssl_ticket_context;
" class="nav-sub-label">
mbedtls_ssl_ticket_context;
</a>
              </li>
      
            </ul>
            
          </li>
        </ul>
      </nav>
    </div>
    <div class="doc-content">
      <h2 id="Documentation" class="doc-title">Documentation</h2>
      <h3 id="includes">Includes</h3>
      

      <h4 id="config.h"><span>config.h</span></h4>
      <pre class="doc-declare"><code>#include "config.h"
</code></pre>
      <pre class="doc-comment">#include "config.h"
</pre>

      <h4 id="MBEDTLS_CONFIG_FILE"><span>MBEDTLS_CONFIG_FILE</span></h4>
      <pre class="doc-declare"><code>#include MBEDTLS_CONFIG_FILE
</code></pre>
      <pre class="doc-comment">#include MBEDTLS_CONFIG_FILE
</pre>

      <h4 id="ssl.h"><span>ssl.h</span></h4>
      <pre class="doc-declare"><code>#include "ssl.h"
</code></pre>
      <pre class="doc-comment">#include "ssl.h"
</pre>

      <h4 id="cipher.h"><span>cipher.h</span></h4>
      <pre class="doc-declare"><code>#include "cipher.h"
</code></pre>
      <pre class="doc-comment">#include "cipher.h"
</pre>

      <h4 id="threading.h"><span>threading.h</span></h4>
      <pre class="doc-declare"><code>#include "threading.h"
</code></pre>
      <pre class="doc-comment">#include "threading.h"
</pre>
      <h3 id="macros">Macros</h3>
      

      <h4 id="MBEDTLS_SSL_TICKET_H">Marco <span>MBEDTLS_SSL_TICKET_H</span></h4>
      <pre class="doc-declare"><code>#define MBEDTLS_SSL_TICKET_H
</code></pre>
      <pre class="doc-comment"></pre>
      <h3 id="functions">Functions</h3>
      

      <h4 id="mbedtls_ssl_ticket_init">Func <span>mbedtls_ssl_ticket_init</span></h4>
      <pre class="doc-declare"><code>void mbedtls_ssl_ticket_init( mbedtls_ssl_ticket_context *ctx );</code></pre>
      <pre class="doc-comment">/**
 * \brief           Initialize a ticket context.
 *                  (Just make it ready for mbedtls_ssl_ticket_setup()
 *                  or mbedtls_ssl_ticket_free().)
 *
 * \param ctx       Context to be initialized
 */</pre>

      <h4 id="mbedtls_ssl_ticket_setup">Func <span>mbedtls_ssl_ticket_setup</span></h4>
      <pre class="doc-declare"><code>int mbedtls_ssl_ticket_setup( mbedtls_ssl_ticket_context *ctx,
   int (*f_rng)(void *, unsigned char *, size_t), void *p_rng,
   mbedtls_cipher_type_t cipher,
   uint32_t lifetime );</code></pre>
      <pre class="doc-comment">/**
 * \brief           Prepare context to be actually used
 *
 * \param ctx       Context to be set up
 * \param f_rng     RNG callback function
 * \param p_rng     RNG callback context
 * \param cipher    AEAD cipher to use for ticket protection.
 *                  Recommended value: MBEDTLS_CIPHER_AES_256_GCM.
 * \param lifetime  Tickets lifetime in seconds
 *                  Recommended value: 86400 (one day).
 *
 * \note            It is highly recommended to select a cipher that is at
 *                  least as strong as the the strongest ciphersuite
 *                  supported. Usually that means a 256-bit key.
 *
 * \note            The lifetime of the keys is twice the lifetime of tickets.
 *                  It is recommended to pick a reasonnable lifetime so as not
 *                  to negate the benefits of forward secrecy.
 *
 * \return          0 if successful,
 *                  or a specific MBEDTLS_ERR_XXX error code
 */</pre>

      <h4 id="mbedtls_ssl_ticket_free">Func <span>mbedtls_ssl_ticket_free</span></h4>
      <pre class="doc-declare"><code>void mbedtls_ssl_ticket_free( mbedtls_ssl_ticket_context *ctx );</code></pre>
      <pre class="doc-comment">/**
 * \brief           Free a context's content and zeroize it.
 *
 * \param ctx       Context to be cleaned up
 */</pre>
      <h3 id="vars">Vars</h3>
      

      <h4 id="mbedtls_ssl_ticket_write">Variable <span>mbedtls_ssl_ticket_write</span></h4>
      <pre class="doc-declare"><code>mbedtls_ssl_ticket_write_t mbedtls_ssl_ticket_write;</code></pre>
      <pre class="doc-comment">/**
 * \brief           Implementation of the ticket write callback
 *
 * \note            See \c mbedlts_ssl_ticket_write_t for description
 */</pre>

      <h4 id="mbedtls_ssl_ticket_parse">Variable <span>mbedtls_ssl_ticket_parse</span></h4>
      <pre class="doc-declare"><code>mbedtls_ssl_ticket_parse_t mbedtls_ssl_ticket_parse;</code></pre>
      <pre class="doc-comment">/**
 * \brief           Implementation of the ticket parse callback
 *
 * \note            See \c mbedlts_ssl_ticket_parse_t for description
 */</pre>
      <h3 id="consts">Consts</h3>
      
      <h3 id="types">Types</h3>
      
      <h3 id="typedefs">Typedefs</h3>
      

      <h4 id="
mbedtls_ssl_ticket_key;
">Typedef <span>
mbedtls_ssl_ticket_key;
</span></h4>
      <pre class="doc-declare"><code>typedef struct mbedtls_ssl_ticket_key
{
   unsigned char name[4];         /*!< random key identifier              */
   uint32_t generation_time;      /*!< key generation timestamp (seconds) */
   mbedtls_cipher_context_t ctx;  /*!< context for auth enc/decryption    */
}
mbedtls_ssl_ticket_key;
</code></pre>
      <pre class="doc-comment">/**
 * \brief   Information for session ticket protection
 */</pre>

      <h4 id="
mbedtls_ssl_ticket_context;
">Typedef <span>
mbedtls_ssl_ticket_context;
</span></h4>
      <pre class="doc-declare"><code>typedef struct mbedtls_ssl_ticket_context
{
   mbedtls_ssl_ticket_key keys[2]; /*!< ticket protection keys             */
   unsigned char active;          /*!< index of the currently active key  */

   uint32_t ticket_lifetime;      /*!< lifetime of tickets in seconds     */

   /** Callback for getting (pseudo-)random numbers                        */
   int (*f_rng)(void *, unsigned char *, size_t);
   void *p_rng;                   /*!< context for the RNG function       */

#if defined(MBEDTLS_THREADING_C)
   mbedtls_threading_mutex_t mutex;
#endif
}
mbedtls_ssl_ticket_context;
</code></pre>
      <pre class="doc-comment">/**
 * \brief   Context for session ticket handling functions
 */</pre>
    </div>
  </body>
</html>
            